﻿using UnityEngine;
using System.Collections;

namespace Inlycat
{
    /// <summary>
    /// Http加载显示对象控制脚本
    /// </summary>

    public class HttpLoadingCtrl : MonoBehaviour
    {
        /// <summary>
        /// 是否正在显示
        /// </summary>
        private bool isShow;

        /// <summary>
        /// 是否正在显示
        /// </summary>
        public bool IsShow
        {
            get { return isShow; }
        }

        /// <summary>
        /// 显示加载
        /// </summary>
        /// <param name="text">加载文字</param>
        /// <param name="delay">显示延时</param>
        public void ShowLoading(string text, float delay)
        {
            isShow = true;
            Invoke("Show", delay);
        }

        /// <summary>
        /// 隐藏加载
        /// </summary>
        public void HideLoading()
        {
            isShow = false;
            CancelInvoke();
        }

        private void Show()
        {

        }
    }
}